//index.js
//获取应用实例
const app = getApp()

Page({
  data: {
   userInfo:'',
   

  },
  onLoad: function () {
    var that = this
    that.userInfo()
    
  },
  onReady: function (){
    var that = this
    
  },
  /**
   * 用户信息
   */
  userInfo: function (){
    var that = this;
    var userInfo = app.globalData.userInfo
    console.log(userInfo )
    that.setData({ userInfo: userInfo})
  },
  onShareAppMessage: function () {
    return {
      title: '',
      path: ''
    }
  },
  cart:function (){
    wx.switchTab({
      url: '/pages/cart/cart'
    })
  }
})
